package com.ruoyi.coupon.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠券管理对象 coupon
 * 
 * @author ximu
 * @date 2023-03-17
 */
public class Coupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 优惠券id */
    private Long couponId;

    /** 归属用户 */
    @Excel(name = "归属用户")
    private Long userId;

    /** 优惠券名字 */
    @Excel(name = "优惠券名字")
    private String couponName;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private Long couponAmount;

    /** 是否兑换 */
    @Excel(name = "是否兑换")
    private Integer isExchange;

    /** 失效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "失效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date failureTime;

    public void setCouponId(Long couponId) 
    {
        this.couponId = couponId;
    }

    public Long getCouponId() 
    {
        return couponId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setCouponName(String couponName) 
    {
        this.couponName = couponName;
    }

    public String getCouponName() 
    {
        return couponName;
    }
    public void setCouponAmount(Long couponAmount) 
    {
        this.couponAmount = couponAmount;
    }

    public Long getCouponAmount() 
    {
        return couponAmount;
    }
    public void setIsExchange(Integer isExchange) 
    {
        this.isExchange = isExchange;
    }

    public Integer getIsExchange() 
    {
        return isExchange;
    }
    public void setFailureTime(Date failureTime) 
    {
        this.failureTime = failureTime;
    }

    public Date getFailureTime() 
    {
        return failureTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("couponId", getCouponId())
            .append("userId", getUserId())
            .append("couponName", getCouponName())
            .append("couponAmount", getCouponAmount())
            .append("isExchange", getIsExchange())
            .append("failureTime", getFailureTime())
            .toString();
    }
}
